/*
 * @Desc:
 * @author cheegon
 * @date 2022/7/25  10:31
**/
import { apiGet, apiPost } from '../config/apiConfig'

/**
 * 登入
 * @param params 1密码登录 2验证码登录 3登录-需要携带密码和验证码
 * @returns {Promise | Promise<unknown>}
 */
export const reqLogin = (params) => apiPost('/admin/login', params)
/**
 *
 * @param params
 * @returns {Promise | Promise<unknown>}
 */
/**
 * 注册
 * @param params
 * @returns {Promise | Promise<unknown>}
 */
export const reqRegister = (params) => apiPost('/admin/register', params)
/**
 * 登出
 * @param params
 * @returns {Promise<unknown>}
 */
export const reqLogout = (params) => apiPost('/admin/logout', params)
/**
 * 请求用户信息
 * @param params
 * @returns {Promise<unknown>}
 */
export const reqUserInfo = () => apiGet('/admin/userInfo')
/**
 * 请求编辑用户信息
 * @param params
 * @returns {Promise<unknown>}
 */
export const reqEditUserInfo = (params) => apiPost('/admin/editUserInfo', params)
/**
 * 修改密码
 * @param params
 * @returns {Promise | Promise<unknown>}
 */
export const reqChangePassword = (params) => apiPost('/admin/changePassword', params)
/**
 * 重置密码
 * @param params
 * @returns {Promise | Promise<unknown>}
 */
export const reqResetPassword = (params) => apiPost('/admin/resetPassword', params)









